import Vue from 'vue'
import VueRouter from 'vue-router'


import Home from "@/views/home/Home.vue"


Vue.use(VueRouter)

const routes = [{
    path: '/',
    redirect: 'home'
  },
  {
    path: '/home',
    component: Home
  },
  {
    path: '/classify',
    component: () => import("@/views/classify/Classify.vue")
  },
  {
    path: '/cart',
    component: () => import("@/views/cart/Cart.vue")
  },
  {
    path: '/my',
    component: () => import("@/views/my/My.vue")
  },
  {
    path: '/detail/:iid',
    component: () => import("@/views/home/detail/Detail.vue"),
    props:true
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router